package com.dong.utils;

import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL;
import java.net.URLConnection;

public class Uri2String {

	public synchronized static String getResult(String url){
		StringBuilder sb  = new StringBuilder();
		try {
			URL ur=new URL(url);
			URLConnection conn = ur.openConnection();
			conn.connect();
			InputStream in = conn.getInputStream();
			byte c[]=new byte[1024];
			int lent=0;
			while((lent=in.read(c))!=-1){
				String s=new String(c, 0,lent);
				sb.append(s);
			}
			in.close();
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		return sb.toString();
	}
	
//	http://www.yi18.net/
	
}
